package com.evildog.workspace.life.application.convert;

import com.evildog.workspace.common.result.PagedResult;
import java.util.List;
import com.evildog.workspace.life.application.vo.MicroHabitPageVO;
import com.evildog.workspace.life.application.vo.MicroHabitListVO;
import com.evildog.workspace.life.application.vo.MicroHabitVO;
import com.evildog.workspace.life.application.dto.MicroHabitPageDTO;
import com.evildog.workspace.life.application.dto.MicroHabitListDTO;
import com.evildog.workspace.life.application.dto.MicroHabitDTO;
import com.evildog.workspace.life.application.model.MicroHabitParam;
import com.evildog.workspace.life.application.model.MicroHabitPageParam;
import com.evildog.workspace.life.application.model.MicroHabitListParam;
import com.evildog.workspace.life.application.bo.MicroHabitBO;
import com.evildog.workspace.life.application.bo.MicroHabitPageBO;
import com.evildog.workspace.life.application.bo.MicroHabitListBO;
import com.evildog.workspace.life.application.entity.MicroHabit;
import com.evildog.workspace.life.application.entity.MicroHabitPageDO;
import com.evildog.workspace.life.application.entity.MicroHabitListDO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface MicroHabitConvert {

    MicroHabitConvert INSTANCE = Mappers.getMapper(MicroHabitConvert.class);

    MicroHabitPageDTO convert(MicroHabitPageParam microHabitPageParam);

    MicroHabitListDTO convert(MicroHabitListParam microHabitListParam);

    MicroHabitDTO convert(MicroHabitParam microHabitParam);

    @Mapping(target = "isDeleted", ignore = true)
    MicroHabit convert(MicroHabitDTO microHabitDTO);

    MicroHabitPageDO convert(MicroHabitPageDTO microHabitPageDTO);

    MicroHabitVO convert(MicroHabitBO microHabitBO);

    MicroHabitBO convert(MicroHabit microHabit);

    List<MicroHabitListBO> convert(List<MicroHabitListDO> microHabitList);

    List<MicroHabitListVO> convertVoList(List<MicroHabitListBO> microHabitListBO);

    @Mappings({})
    PagedResult<MicroHabitPageBO> convert(IPage<MicroHabitPageDO> page);

    PagedResult<MicroHabitPageVO> convert(PagedResult<MicroHabitPageBO> page);
}